-
-
Notifications
You must be signed in to change notification settings - Fork 804
feat: add C implementation for math/base/special/cos
#2352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Philipp Burckhardt <[email protected]>
@gunjjoshi Thank you, @gunjjoshi! Will merge shortly. |
#ifndef STDLIB_MATH_BASE_SPECIAL_COS_H | ||
#define STDLIB_MATH_BASE_SPECIAL_COS_H | ||
|
||
#include <stdint.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This include is not necessary.
#include <stdint.h> | ||
|
||
// High word absolute value mask: 0x7fffffff => 01111111111111111111111111111111 | ||
static const int32_t HIGH_WORD_ABS_MASK = 0x7fffffff; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we have a constant package for this.
static const int32_t HIGH_WORD_TWO_NEG_27 = 0x3e400000; | ||
|
||
// High word exponent mask: 0x7ff00000 => 01111111111100000000000000000000 | ||
static const int32_t HIGH_WORD_EXPONENT_MASK = 0x7ff00000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment. We have a pkg for this, IIRC.
PR-URL: #2355 Ref: #2352 Reviewed-by: Athan Reines <[email protected]>
PR-URL: stdlib-js#2352 Ref: stdlib-js#649 --------- Signed-off-by: Philipp Burckhardt <[email protected]> Co-authored-by: Philipp Burckhardt <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#2355 Ref: stdlib-js#2352 Reviewed-by: Athan Reines <[email protected]>
PR-URL: stdlib-js#2352 Ref: stdlib-js#649 --------- Signed-off-by: Philipp Burckhardt <[email protected]> Co-authored-by: Philipp Burckhardt <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#2355 Ref: stdlib-js#2352 Reviewed-by: Athan Reines <[email protected]>
Description
This pull request:
math/base/special/cos
.Related Issues
This pull request:
Questions
No.
Other
I have added the extended comment from the
FreeBSD
source in both theC
andjavascript
implementations.Checklist
@stdlib-js/reviewers